#!/usr/bin/env python
# -*- coding:utf-8 -*- 
# Author: Jeokayne Ataier
import multiprocessing as mp


#无法保证QUEUE的有序性，线程应是同理

def job(list,q):
    for i in range(len(list)):
        list[i] = list[i]**2 + list[i]**3
    q.put(list)


if __name__ == "__main__":
    datalist = list(range(100))
    datalist2 = list(range(1000))
    q = mp.Queue()
    mp1 = mp.Process(target=job,args=(datalist,q,))
    mp2 = mp.Process(target=job,args=(datalist2,q,))
    mp1.start()
    mp2.start()
    mp1.join()
    mp2.join()


    r1 = q.get()
    r2 = q.get()

    print(r1)
    print(r2)